package gradle.common.core.enums;


import lombok.Getter;
import org.springframework.http.HttpStatus;

@Getter
public enum ResultCodeEnum {


    /**
     * 响应信息
     */
    SUCCESS(200, "请求成功"),
    PARAMETER_ERROR(40001, "请求参数有误"),
    OTHER_EXCEPTION(500, "Unknown Error!"),
    BUSINESS_ERROR(400, "业务异常"),
    //401
    UNAUTHORIZED(HttpStatus.UNAUTHORIZED.value(), "权限不足！"),

    ACCOUNT_EXPIRED(4001, "登陆过期请重新登录！"),

    SERVICE_ERROR(-1, "服务器错误，请稍后重试"),


    ;

    /**
     * code
     */
    private int code;

    /**
     * message
     */
    private String message;

    ResultCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

}
